package com.yueyang.sojourn.server.service.sojourn.share;

import com.yueyang.sojourn.server.model.po.SojournShare;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Andy.yang
 * @version v1
 * @summary
 * @Copyright (c) 2019, YueYang Group All Rights Reserved.
 * @since 2020/3/30
 */
@Mapper
public interface SojournShareMapper {
    /**
     * 创建分账单
     * @param share
     * @return
     */
    int insert(SojournShare share);

    /**
     * 修改状态
     * @param share
     * @return
     */
    int updateThirdShareIdAndStatus(SojournShare share);

    /**
     * 查询分账单
     * @param id
     * @return
     */
    SojournShare selectByPrimaryKey(Long id);

    /**
     *  查询分账单列表
      * @param userId
     * @return
     */
    List<SojournShare> findBy(@Param("userId") Long userId, @Param("status") Integer status);
}
